import request from '@/config/axios'

export interface PayInfoVO {
  id: number
  htid: string
  jdh: string
  sfklx: string
  sfkfx: string
  ysfje: number
  sjysfje: number
  sjsfje: number
  wsfje: number
  ysfrq: localdate
  sjysfrq: localdate
  ceyy: string
  zffs: string
  djh: string
  jssj: Date
  jsdjh: string
  sfkjfp: boolean
  fph: string
  khfzr: string
  fpjr: number
  jsr: string
  pjysfs: string
  pjysh: string
  bz: string
}

// 查询合同收付款记录表 分页
export const getPayInfoPage = async (params) => {
  return await request.get({ url: `/cont/pay-info/page`, params })
}

// 查询合同收付款记录表 详情
export const getPayInfo = async (id: number) => {
  return await request.get({ url: `/cont/pay-info/get?id=` + id })
}

// 新增合同收付款记录表 
export const createPayInfo = async (data: PayInfoVO) => {
  return await request.post({ url: `/cont/pay-info/create`, data })
}

// 修改合同收付款记录表 
export const updatePayInfo = async (data: PayInfoVO) => {
  return await request.put({ url: `/cont/pay-info/update`, data })
}

// 删除合同收付款记录表 
export const deletePayInfo = async (id: number) => {
  return await request.delete({ url: `/cont/pay-info/delete?id=` + id })
}

// 导出合同收付款记录表  Excel
export const exportPayInfo = async (params) => {
  return await request.download({ url: `/cont/pay-info/export-excel`, params })
}